#!/bin/sh

# Make sure all services have actually exited *completely*
for svc in /services/[a-z]*; do [ -d "$svc" ] && redirfd -w 2 /dev/null s6-svc -d -wD "$svc"; done

# Remove leftover pid files from a stop/start
rm -rf /var/run/*.pid /var/run/*/*.pid

# Avoid "Compromised token secret file" error after container restart
rm -f /var/run/dovecot/auth-token-secret.dat

exit 0
